package com.example.java.newFeature;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

public class VarDemo {
    public static void main(String[] args) {
        var a = 1;
        var b = "hello";
        System.out.println(a);
        System.out.println(b);

        List<String> names = Arrays.asList("Bob", "Alice", "Charlie");
        names.sort(Comparator.comparingInt(String::length));
    }
}
